home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
usenet
/
sources
/
volume91
/
devices
/
yes_1_0
/
part01
/
c.a
next >
Wrap
Text File
|
1991-05-08
|
1KB
|
59 lines
* this be my startup, though I took much of it from elsewhere.
* Eric Lee Green, 2/91
INCLUDE "exec/types.i"
INCLUDE "exec/memory.i"
INCLUDE "exec/execbase.i"
FUNCDEF MACRO * function
_LVO\1 EQU FUNC_CNT
FUNC_CNT SET FUNC_CNT-6
ENDM
FUNC_CNT SET LIB_NONSTD
INCLUDE "exec/exec_lib.i"
xref LinkerDB * linker defined base value
xref _BSSBAS * linker defined base of BSS
xref _BSSLEN * linker defined length of BSS
section text,code
xref @_main
start:
movem.l d1-d6/a0-a6,-(a7)
move.l a0,a2
move.l d0,d2
lea LinkerDB,a4
lea _BSSBAS,a3
moveq #0,d1
move.l #_BSSLEN,d0
bra.s clr_lp
clr_bss move.l d1,(a3)+
clr_lp dbf d0,clr_bss
move.l a7,_StackPtr(A4)
move.l 04,a6
move.l a6,SysBase(A4)
main
jsr @_main(PC) * call C entrypoint
; NOTE: We're never intended to return from here! So the following
; should *NEVER* be executed!
move.l _StackPtr(A4),a7
movem.l (a7)+,d1-d6/a0-a6 * restore registers
moveq #0,d0
rts
section __MERGED,BSS
xdef NULL,SysBase
NULL ds.b 4 *
SysBase ds.b 4
_StackPtr ds.b 4
END